package items;

import components.EntityComponent;

import entities.Entity;
import entities.Player;

/**
 * <p>An item is something that can be picked up and used by an {@link ItemHolder}<p>
 * <p>Items are usually given by picking up an {@link entities.ItemEntity} but can also be used like regular Components.</p>
 * <p><b>Note:</b> Items are always active in this engine (they inherit from {@link EntityComponent}).<br>
 * Passive upgrades (e.g. increased damage) are not considered to be items.</p>
 * 
 * @author Sebastian
 */
public abstract class Item extends EntityComponent {

	public enum ItemType {
		WEAPON
	}

	protected final ItemType type;

	protected Player player;

	public Item(Entity e, ItemType type) {
		super(e);
		this.type = type;
	}

	public abstract void use();

	public ItemType getType() {
		return type;
	}
	
	@Override
	public void tick(float dt) {
		//No functionality
		//Only there to prevent subclasses from having to implement this method
	}

}
